package com.netease.nim.chatroom.demo.meeting.fragment.tab;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.netease.nim.chatroom.demo.R;
import com.netease.nim.chatroom.demo.meeting.fragment.ApplyForSpeechFragment;

/**
 * Created by hzxuwen on 2016/4/21.
 */
public class ApplyForSpeechTabFragment extends ChatRoomTabFragment {
    ApplyForSpeechFragment fragment;

    public ApplyForSpeechTabFragment() {
        this.setContainerId(ChatRoomTab.APPLY_FOR_SPEECH.fragmentId);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return super.onCreateView(inflater, container, savedInstanceState);
    }

    @Override
    protected void onInit() {
        findViews();
    }

    @Override
    public void onLeave() {
        super.onLeave();
    }

    @Override
    public void onCurrent() {
        super.onCurrent();
        if (fragment != null) {
            fragment.checkPermission();
        }
    }

    private void findViews() {
        fragment = (ApplyForSpeechFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.apply_for_fragment);
    }
}
